//package com.jiuhe.handi.app.shopcar.confirm.adapter;
//
//import android.support.annotation.Nullable;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.text.TextUtils;
//import android.widget.TextView;
//
//import com.chad.library.adapter.base.BaseQuickAdapter;
//import com.chad.library.adapter.base.BaseViewHolder;
//import com.jiuhe.handi.R;
//import com.jiuhe.handi.common.data.utils.SpUtil;
//import com.jiuhe.handi.constant.Constant;
//import com.jiuhe.handi.models.remote.cart.Good;
//import com.jiuhe.handi.models.remote.cart.Shop;
//import com.jiuhe.handi.ui.SimpleDividerDecoration;
//import com.jiuhe.handi.utils.LyxUtils;
//
//import java.util.List;
//
///**
// * Created by SEELE on 2018/4/23.
// */
//
//public class ConfirmShopAdapter extends BaseQuickAdapter<Shop, BaseViewHolder> {
//    public ConfirmShopAdapter(@Nullable List<Shop> data) {
//        super(R.layout.item_comfirm_contrain_layout, data);
//    }
//
//    @Override
//    protected void convert(BaseViewHolder helper, Shop item) {
//        double rate = Double.valueOf(SpUtil.getInstance().getString(Constant.USD_RATE));
//        TextView tvShopName = helper.getView(R.id.tv_shop_name);
//        RecyclerView recyShop = helper.getView(R.id.recycler_shop);
//        TextView tvGoodTotal = helper.getView(R.id.tv_good_total);
//        TextView tv_shop_price = helper.getView(R.id.tv_shop_price);
//        TextView tv_train_pay = helper.getView(R.id.tv_train_pay);
//
//        tvShopName.setText(item.getShopName());
//        tvGoodTotal.setText(mContext.getString(R.string.shop_total) + " "+item.getItem_total() + " "+ mContext.getString(R.string.shop_total_goods));
//        tv_train_pay.setText(mContext.getString(R.string.contrain_contry_train_pay2) + item.getShipping_fee() + mContext.getString(R.string.other_yuan));
//       double shopPrice =  LyxUtils.formatDouble2(item.getShipping_fee()+item.getTotal_price());
//        tv_shop_price.setText(mContext.getString(R.string.money_usd_symbol)+ LyxUtils.formatDivide(shopPrice,rate));
//
//
//        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext);
//        recyShop.setNestedScrollingEnabled(false);
//        recyShop.setLayoutManager(linearLayoutManager);
//        List<Good> goods = item.getGoods();
//        for (int i = 0; i < goods.size(); i++) {
//            goods.get(i).setIsMark(!TextUtils.isEmpty(goods.get(i).getCart_p_note()));
//        }
//        final ConfirmGoodAdaper confirmGoodAdaper = new ConfirmGoodAdaper(goods);
//        recyShop.addItemDecoration(new SimpleDividerDecoration(mContext, 3, R.color.bg_color));
//        recyShop.setAdapter(confirmGoodAdaper);
//
////        confirmGoodAdaper.setOnItemClickListener(new OnItemClickListener() {
////            @Override
////            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
////                Navigation.goCommonWebView((Activity) mContext, mContext.getString(R.string.good_detail), confirmGoodAdaper.getData().get(position).getCart_p_url(), false);
////            }
////        });
//    }
//}
